<?php
error_reporting(0);
define('IN_QY',true);
session_start();
require("include/common.inc.php");
define('SCRIPT','ad_list');
if(!$_COOKIE['userid']){
      echo "<script type='text/javascript'>location.href='/wap/mlogin.php';</script>";
      exit;
}
//
$sqladd = "select * from tbl_fh where infoid='".$_GET['fid']."'";
$queryadd = mysql_query($sqladd);
$rowadd = mysql_fetch_array($queryadd);
//

//
$sqltotalp = "select sum(totprice) as tot from tbl_taorder where orderid='".$_GET['fid']."'";
$querytotalp = mysql_query($sqltotalp);
$rowtotalp = mysql_fetch_array($querytotalp);
//
$sqlalltotalp = "select sum(totprice+expresstri+taxpri-yhqmoney) as tott from tbl_taorder where orderid='".$_GET['fid']."'";
$queryalltotalp = mysql_query($sqlalltotalp);
$rowalltotalp = mysql_fetch_array($queryalltotalp);
$temtot = round($rowalltotalp['tott'], 2);


//
$sql1 = "select * from tbl_taorder where orderid='".$_GET['fid']."' order by id ";
$query1 = mysql_query($sql1);
$row1 = mysql_fetch_array($query1);

//
$sqlspp = "select * from tbl_taospp where id='".$row1['goodid']."'";
$queryspp = mysql_query($sqlspp);
$rowspp = mysql_fetch_array($queryspp);




//

?>

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>海淘商品详细列表-众晒网</title>
    <link rel="stylesheet" type="text/css" href="/ui/css/Hui.css" />
    <script type="text/javascript" src="/ui/layer/mobile/layer.js"></script>   
    <style type="text/css">
        #header{width:100%; height:44px; position:fixed; top:0;z-index:999;}

     #footer{width:100%; height:55px; position:absolute; bottom:0;}	 
     #lis{width:100%; overflow: auto; position:absolute; top:50px;bottom:0px;}
    </style>

</head>
<body >
    <header class="H-header H-theme-background-color-white" id="header">
        <span tapmode="" onclick="H.closeWin();" id="guanbi" class="H-icon H-position-relative H-display-inline-block H-float-left H-vertical-middle H-theme-font-color-gray H-padding-horizontal-left-5 H-z-index-100"><i class="H-iconfont H-icon-arrow-left H-font-size-18 H-vertical-middle"></i></span>
        <div class="H-header-title H-center-all H-font-size-18 H-text-show-row-1 H-theme-font-color-black H-position-absolute H-width-100-percent">订单详情</div>		
    </header> 
			<div class="H-padding-vertical-bottom-10"></div>
    <div id="lis">
            <div  class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after H-margin-vertical-bottom-5">
                <div class="H-flex-item H-padding-10">
                    <i class="H-iconfont H-icon-where H-font-size-23 H-vertical-middle"  style="position:absolute;"></i>
                    <strong style="width:50%;margin-left:20px" class="H-font-weight-normal font-weight-500 H-font-size-12 H-theme-font-color-black H-display-block H-text-show-row-1">收货人：<?php echo $rowadd['name'] ?></strong>
                    <span style="position:absolute;top:6px;right:40px"><?php echo $rowadd['telnum'] ?></span>
                    <div class="H-font-size-10 H-theme-font-color-999 H-text-show-row-2" style="margin-left:20px">
                        <span class="H-font-size-12">收货地址：<span id="dz"><?php echo $rowadd['address'] ?></span></span>
                    </div>
                    <span style="float:right;position:absolute;top:15px;right:3px"><i class="H-iconfont H-icon-arrow-right H-font-size-17 H-vertical-middle"></i></span>
                </div>

            </div> 
    <!---haha--

        <div class="H-qq-item H-vertical-middle H-overflow-hidden">
        <div class="H-flexbox-horizontal H-box-sizing-border-box H-theme-background-color-white H-border-vertical-bottom-after H-clear-both H-padding-horizontal-both-10 H-padding-vertical-both-8 H-touch-active">
                <div class="H-flex-item H-padding-horizontal-both-10 H-vertical-middle H-overflow-hidden">
                    <div class="H-width-100-percent">
                        <strong class="H-font-weight-normal H-display-block H-font-weight-500 H-font-size-16 H-text-show-row-1">发票信息</strong>
                        <div class="H-theme-font-color-999 H-font-size-14 H-padding-vertical-top-3 H-text-show-row-1">发票抬头:
						<?php if ($row1['taxman']==0)  { ?>
						
						未开发票
						<?php }?>
								<?php if ($row1['taxman']!=0)  { ?>
						
						<?=$row1['taxman']?>
						
						<?php }?>
						
						</div>
                    </div>
                </div>

        </div>
        </div>
--->
    <!---haha----->	
	<!-------------------------
	    <div class="H-text-list H-flexbox-horizontal  H-theme-background-color-white H-border-vertical-bottom-margin-left-10-after H-vertical-middle H-touch-active">
       
	   <span class="H-icon H-display-block H-margin-horizontal-left-10">
	     <img src="<?php echo $rowuser['username'] ?>" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 31px; height: 31px;" />
		</span>
		
		
        <div class="H-flex-item H-padding-horizontal-both-10 H-font-size-16 H-padding-vertical-both-12"><?php echo $rowspp['ggunit'] ?></div>
        <span class="H-icon H-padding-horizontal-right-5 H-display-block"><i class="H-iconfont H-icon-arrow-right H-theme-font-color-ccc H-font-size-14 H-vertical-middle"></i></span>
        </div>
		
		------------------>

				  <?php
        $sql2 = "select * from tbl_taorder  where uid='".$_COOKIE['userid']."'  AND orderid='".$_GET['fid']."'";
        $query2=mysql_query($sql2);

		while ($row2=mysql_fetch_array($query2)) {    
      
    ?> 
	
	     <?php
       $sql3 = "select * from tbl_taospp  where id='".$row2['goodid']."'";
        $query3=mysql_query($sql3);
		$row3=mysql_fetch_array($query3);
		 $a=explode(',', $row3['img']);  
		 
		 ?>
		 
        <div id="list1" class="H-border-radius3-px H-theme-background-color-white H-margin-vertical-bottom-5 H-border-vertical-both-after H-border-horizontal-both-after">
            <div  onclick="H.openWin('htspxq', '/haigou/htspxq.php?fid=<?php echo $row2['goodid'] ?>');"  class="H-flexbox-horizontal H-theme-background-color-white H-border-vertical-bottom-after">
                <div class="H-padding-vertical-both-10">
                    <img src="<?php echo $a[0] ?>" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 60px; height: 60px;" />
                </div>
                <div class="H-flex-item H-padding-10">
                    <strong class="H-font-weight-normal font-weight-500 H-font-size-16 H-display-block H-text-show-row-1"><?=$row3['chtitle']?></strong>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-1">
                    <?=$row3['origin']?>
                    </div>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-2">
                   ￥: <?=$row2['gprice']?>	,vip价格:<?=$row2['vip_good_price']?>			 
                    </div>
                    <div class="H-font-size-12 H-theme-font-color-999 H-text-show-row-2">
                   数量: <?=$row2['gnum']?>				 
                    </div>	
                </div>
				
            </div>
        </div>
		
		      <?php } ?>
		
 
<!-- 商品列表-->            
             <div class="H-padding-10 H-border-vertical-bottom-after  H-theme-background-color-white H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box" >               
            <span class="H-display-block H-flex-item H-theme-font-color-black-active">
			<span>商品总价</span> 
			<span  style="float:right;color:#EE7942;"><?=$rowtotalp['tot']?> </span> <br/>
			<span>运费(快递)</span>
			<span  style="float:right;color:#EE7942;"><?=$row1['expresstri']?></span> <br/>							
            </span>
			
            </div>  

	    <div class="H-text-list H-flexbox-horizontal  H-theme-background-color-white H-border-vertical-bottom-after H-vertical-middle H-touch-active">
        <div class="H-flex-item H-padding-horizontal-both-10 H-font-size-16 H-padding-vertical-both-12">实付款</div>
        <span class="H-badge H-display-block" style="color:#EE7942;font-weight-900;">￥<?=$temtot?></span>
        <span class="H-icon H-padding-horizontal-right-5 H-display-block"></span>
    </div>
		
			

       <div class="bbs-item H-margin-vertical-top-5 H-border-vertical-bottom-after">
            <div class="H-flexbox-horizontal H-clear-both H-theme-background-color-white H-padding-8 H-box-sizing-border-box H-border-vertical-top-margin-both-10-after">
                <span tapmode="" onclick="H.openWin('liaoliao', 'liaoliao.php?fid=<?=$rowlbb['daili']?>');" class="H-font-size-14 H-flex-item  H-center-all  H-border-horizontal-right-after">
                    <img src="/ui/image/联系卖家1.png" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 20px; height: 20px;" />
				<label class="H-display-inline-block H-vertical-middle">联系卖家</label></span>
                <span tapmode="" onclick="H.openWin('#', 'https://www.sobot.com/chat/h5/index.html?sysNum=ec36cd7ac75e471481dbe6ed6704dbf4');" class="H-font-size-14 H-flex-item  H-center-all  H-border-horizontal-left-after">
		           <img src="/ui/image/拨打电话1.png" srcs="" alt="" title="" class="imgCache H-display-block H-margin-horizontal-left-10" style="width: 20px; height: 20px;" />
				<label class="H-display-inline-block  H-vertical-middle">联系客服</label></span>
            </div>
        </div>
		
		<div class="H-padding-vertical-bottom-5"></div>
             <div class="H-padding-10 H-border-vertical-bottom-after  H-theme-background-color-white H-flexbox-horizontal H-theme-font-color-999 H-font-size-14 H-flexbox-horizontal H-text-horizontal-left H-box-sizing-border-box" >               
            <span class="H-display-block H-flex-item H-theme-font-color-black-active">
			<span>订单编号</span> <span  style="float:right;color:#EE7942;"><?=$_GET['fid']?> </span> <br/>
			<span>创建时间</span> <span id="yf" style="float:right;color:#EE7942;"><?=date("Y-m-d H:i",$row1['addtime'])?></span> <br/>							
            </span>
			
        </div> 
			
	<div class="H-theme-background-color-white ">
        <div class="H-padding-vertical-both-8 H-text-align-center">
            <strong class="H-font-size-18 H-font-weight-normal H-font-weight-500 H-text-align-center " style="color:#FF9800;font-weight:800;">推荐商品</strong>
        </div>
    </div>
			<div class="H-padding-vertical-bottom-5"></div>
	
	    <div class=" H-font-size-14 H-clear-both H-width-100-percent H-display-table H-box-sizing-border-box H-padding-horizontal-left-5" style="  background-color: beige;">
		                                    <?
  		    
	$sql = "select * from tbl_taospp where state=1 ORDER by  rand() LIMIT 2";
	$query=mysql_query($sql);
	while($row=mysql_fetch_array($query))
	{	
	?>
						<?php
			$sqlimg="SELECT img FROM tbl_taospp WHERE id= ".$row['id'];
			$rowimg= mysql_query($sqlimg);
			$rowall=mysql_fetch_array($rowimg);
			$imgeve =explode(",", $rowall['img']);
			// print_r($imgeve);
			// $roweve=$rowall['ywyuedu'];
		              ?>
	
        <div tapmode="" onclick="H.openWin('htspxq', '/haigou/htspxq.php?fid=<?=$row['id']?>');" class=" H-display-table-cell H-float-left H-box-sizing-border-box H-width-avg-2 H-margin-vertical-bottom-5" style="height:230px;">
            <div class="H-theme-background-color-white H-margin-horizontal-right-5" style="height:172px;">
                <img src=" <?=$imgeve[0]?>" class="H-width-100-percent H-display-block" alt="" title="" />
                <div class="H-padding-horizontal-both-3 H-text-show-row-2 H-padding-vertical-top-5">
                   <?=mb_substr($row['chtitle'],0,8,'utf-8')?> 
                </div>
                <div class="H-padding-horizontal-both-3 H-flex-item H-theme-font-color7 H-text-align-left H-vertical-middle">
                    ￥<span class="H-font-size-22 H-margin-horizontal-right-5"><?=$row['zswprice']?></span>
                </div>
            </div>
        </div>

		   <?php } ?>    
		

    </div>
		<br><br><br>
				<div class="H-padding-vertical-bottom-5"></div>

	
    </div>

	    <?include('footer.php');?>
	
	
    <script type="text/javascript" src="/ui/script/H.js"></script>
    <script type="text/javascript" src="/ui/js/jquery-1.9.1.min.js"></script>
</body>
</html>